//-----------------------------------------------------------------------------
//	File: key.c
//	Author: hsia
//		bsp of keys
//-----------------------------------------------------------------------------

#ifndef __KEY_H__
#define __KEY_H__

#include "stm32f10x.h"

// define shortcut
#define KEY_S1		KEY_1
#define KEY_S2		KEY_2

// define key's value
#define KEY_1		0x0001
#define KEY_2		0x0002
#define KEY_3		0x0004
#define KEY_4		0x0008
#define KEY_5		0x0010
#define KEY_6		0x0020
#define KEY_7		0x0040
#define KEY_8		0x0080
#define KEY_9		0x0100
#define KEY_10		0x0200
#define KEY_11		0x0400
#define KEY_12		0x0800
#define KEY_13		0x1000
#define KEY_14		0x2000
#define KEY_15		0x4000
#define KEY_16		0x8000

//-----------------------------------------------------------------------------
//	keys gpio configure
//-----------------------------------------------------------------------------
void configure_key_gpio(void);

//-----------------------------------------------------------------------------
//	Scan the keys
//-----------------------------------------------------------------------------
uint16_t key_scan(void);

#endif
